//创建帮派 {"公告":"帮派简介123123123123213123","名称":"帮派名称"}
// @ts-ignore
export async function execute(client_id,message_json) {
    let characters = G.Characters.get_current_login_characters(client_id);
    let name = message_json["名称"];
    let notice = message_json["公告"];
    let count = await G.GangUtils.count_by_name(name);
    if(count > 0){
        ClientUtils.send_basic_prompt(client_id,"#Y/帮派名称重复");
        return;
    }
    let gang_data = await G.GangUtils.create_gang(characters,name,notice);
    if(gang_data !== undefined){
        characters["BPMC"]=name;
        characters["BPID"]=gang_data["帮派编号"];
        ClientUtils.send_basic_prompt(client_id,"#Y/恭喜你成功创建帮派。");
        G.ChatUtils.send_all_sytem_chat(`#G${characters["名称"]}#Y在帮派管理员处#Y创建了一个帮派，正在广纳贤才！`);
    }else{
        ClientUtils.send_basic_prompt(client_id,"#R/创建失败，请联系管理员。");
    }
}